package bairui.international.data;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ActiveProfiles;
import org.testng.annotations.Test;

import com.lianjing.sh.project.config.base.profile.Project_Profile;

import bairui.international.config.Config_RootAdmin_TestDeployment;
import bairui.international.service.Service_City;
import bairui.international.service.Service_Province;
import bairui.international.service.Service_SystemConfig;
import bairui.international.service.Service_Town;

@ActiveProfiles(
	profiles=Project_Profile.Development,
	inheritProfiles=false
)
public class Tool_InitTestData extends Config_RootAdmin_TestDeployment {

	@Autowired Service_Province service_Province;
	@Autowired Service_City service_City;
	@Autowired Service_Town service_Town;
	@Autowired Service_SystemConfig service_SystemConfig;
	
	@Test
	public void test() throws Exception {
		Data_ImportPlace.importData(service_Province, service_City, service_Town);
//		// 初始化分成比例
//		if(null == service_SystemConfig.findFirst()){
//			TB_SystemConfig config = new TB_SystemConfig();
//				// 分成
//				config.setFirstLevelDivideRatio(50D);
//				config.setFirstLevelSubDivideRatio(50D);
//				config.setSecondLevelDivideRatio(25D);
//				config.setSecondLevelSubDivideRatio(50D);
//				// 充值
//				config.setGeneralUserFirstRechargeMinAmount(10000d);
//			service_SystemConfig.save(config);	
//		}
	}

}
